package com.zto.design.command.lightdemo;

/**
 * @program: sch-diy-parent
 * @description: 遥控器使命测试
 * @author: sch
 * @create: 2020-11-28 23:52
 **/
public class RemoteControlTest {
    public static void main(String[] args) {
        SimpleRemoteControl remoteControl = new SimpleRemoteControl();
        Light light = new Light();
        LightOnCommand lightOnCommand = new LightOnCommand(light);
        LightOffCommand lightOffCommand = new LightOffCommand(light);
        remoteControl.setCommand(lightOnCommand,lightOffCommand);

        remoteControl.onButtonWasPushed();
        remoteControl.offButtonWasPshed();
        remoteControl.ondoButtonWasPshed();
    }
}
